package com.hxzy.mapper;
import com.hxzy.entity.BountyOrder;

import org.apache.ibatis.annotations.*;

import java.util.List;

public interface BountyOrderMapper {

    //查询全部
    @Select("select * from bounty_order")
    List<BountyOrder> selectAll();

    //新增
    int insertBounty(BountyOrder bountyOrder);

    //删除
    int deleteBounty(List<Long> ids);

    //修改
    int updateBounty(BountyOrder bountyOrder);

    //根据id查询
    @Select("select * from bounty_order where id =#{id}")
    BountyOrder selectById(Long id);

    //条件分页查询
    List<BountyOrder> selectByPageAndCondition(@Param("begin") int begin, @Param("size") int
            size, @Param("bountyOrder") BountyOrder bountyOrder);

    //查询总记录数
    int selectTotalCountByCondition(BountyOrder bountyOrder);

    //修改状态
    @Update("update bounty_order set status=#{status} where id = #{id}")
    void updateStatus(@Param("id") Long id,@Param("status") Integer status);



}
